Class NotificationSDKServerCredentials
- java.lang.Object
-
- com.vasco.digipass.sdk.utils.notification.server.NotificationSDKServerCredentials
-
public class NotificationSDKServerCredentials extends java.lang.ObjectThe NotificationSDKServerCredentials object encompasses the customer's credentials necessary to log in to each platform specific push notification services. It must be provided to theNotificationSDKServerconstructor.For iOS, both the token-based and certificate-based authentication schemes are supported. When using certificate-based authentication you need to provide:
- The path to a p12 file containing a certificate for the Apple Push Notification service (Sandbox or Production)
- The password of the p12 file
- The path to a p8 file containing a key for the Apple Push Notification service
- The ID of the provided key
- The ID of team responsible for the creation of the key
-
-
Constructor Summary
Constructors Constructor Description NotificationSDKServerCredentials()Creates aNotificationSDKServerCredentialsobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetAndroidFirebaseServiceAccountJson()Gets the path to the Firebase service account JSON configuration file to be used during the communication with the server.byte[]getAndroidFirebaseServiceAccountJsonBytes()Gets the bytes of the Firebase service account JSON configuration file to be used during the communication with the server.java.io.InputStreamgetAndroidFirebaseServiceAccountJsonStream()Gets the input stream of the Firebase service account JSON configuration file to be used during the communication with the server.java.lang.StringgetAndroidProjectKey()Deprecated.UsegetAndroidFirebaseServiceAccountJson()instead.java.lang.StringgetiOSKeyId()Gets the ID of the keyjava.lang.StringgetiOSP12CertificatePassword()Gets the password of the p12 filejava.lang.StringgetiOSP12CertificatePath()Gets the path to the p12 file containing the certificate to be used for the authentication with the serverjava.io.InputStreamgetiOSP12CertificateStream()Gets the stream to the p12 file containing the certificate to be used for the authentication with the serverjava.lang.StringgetiOSP8KeyPath()Gets the path to the p8 file containing the key to be used for the authentication with the serverjava.io.InputStreamgetiOSP8KeyStream()Gets the stream to the p8 file containing the key to be used for the authentication with the serverjava.lang.StringgetiOSTeamId()Gets the ID of the teamvoidsetAndroidFirebaseServiceAccountJson(java.lang.String firebaseServiceAccountJson)Sets the Firebase service account JSON configuration file for the Android specific notification service.voidsetAndroidFirebaseServiceAccountJsonBytes(byte[] firebaseServiceAccountJsonBytes)Sets the Firebase service account JSON configuration bytes for the Android specific notification service.voidsetAndroidFirebaseServiceAccountJsonStream(java.io.InputStream firebaseServiceAccountJsonStream)Sets the Firebase service account JSON configuration stream for the Android specific notification service.voidsetAndroidPlatformCredentials(java.lang.String projectKey)Deprecated.voidsetiOSPlatformCredentials(boolean useDevelopmentServer, java.io.InputStream p12CertificateStream, java.lang.String p12CertificatePassword)Sets the credentials for the certificate-based authentication on the iOS platform.voidsetiOSPlatformCredentials(boolean useDevelopmentServer, java.io.InputStream p8KeyStream, java.lang.String keyId, java.lang.String teamId)Sets the credentials for the token-based authentication on the iOS platform.voidsetiOSPlatformCredentials(boolean useDevelopmentServer, java.lang.String p12CertificatePath, java.lang.String p12CertificatePassword)Sets the credentials for the certificate-based authentication on the iOS platform.voidsetiOSPlatformCredentials(boolean useDevelopmentServer, java.lang.String p8KeyPath, java.lang.String keyId, java.lang.String teamId)Sets the credentials for the token-based authentication on the iOS platform.booleanusesiOSDevelopmentServer()Gets the status of the server to be used.
-
-
-
Constructor Detail
-
NotificationSDKServerCredentials
public NotificationSDKServerCredentials()
Creates aNotificationSDKServerCredentialsobject. The platform specific attributes must be set using the dedicated methods.
-
-
Method Detail
-
setAndroidPlatformCredentials
@Deprecated public void setAndroidPlatformCredentials(java.lang.String projectKey)
Deprecated.Sets the credentials for the Android specific notification service. It is retrieved from the Google API Console.- Parameters:
projectKey- the key to be used for the communication with the server
-
getAndroidProjectKey
@Deprecated public java.lang.String getAndroidProjectKey()
Deprecated.UsegetAndroidFirebaseServiceAccountJson()instead.Gets the project key to be used during the communication with the server.- Returns:
- the key to be used during the communication with the server
-
setAndroidFirebaseServiceAccountJson
public void setAndroidFirebaseServiceAccountJson(java.lang.String firebaseServiceAccountJson)
Sets the Firebase service account JSON configuration file for the Android specific notification service. It is retrieved from the Google Firebase Console.- Parameters:
firebaseServiceAccountJson- the path to the Firebase service account JSON configuration file to be used during the communication with the server
-
getAndroidFirebaseServiceAccountJson
public java.lang.String getAndroidFirebaseServiceAccountJson()
Gets the path to the Firebase service account JSON configuration file to be used during the communication with the server.- Returns:
- the path to the Firebase service account JSON configuration file to be used during the communication with the server
-
setAndroidFirebaseServiceAccountJsonStream
public void setAndroidFirebaseServiceAccountJsonStream(java.io.InputStream firebaseServiceAccountJsonStream)
Sets the Firebase service account JSON configuration stream for the Android specific notification service. It is retrieved from the Google Firebase Console.- Parameters:
firebaseServiceAccountJsonStream- the stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
getAndroidFirebaseServiceAccountJsonStream
public java.io.InputStream getAndroidFirebaseServiceAccountJsonStream()
Gets the input stream of the Firebase service account JSON configuration file to be used during the communication with the server.- Returns:
- the input stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
setAndroidFirebaseServiceAccountJsonBytes
public void setAndroidFirebaseServiceAccountJsonBytes(byte[] firebaseServiceAccountJsonBytes)
Sets the Firebase service account JSON configuration bytes for the Android specific notification service. It is retrieved from the Google Firebase Console.- Parameters:
firebaseServiceAccountJsonBytes- the stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
getAndroidFirebaseServiceAccountJsonBytes
public byte[] getAndroidFirebaseServiceAccountJsonBytes()
Gets the bytes of the Firebase service account JSON configuration file to be used during the communication with the server.- Returns:
- the input stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, java.lang.String p12CertificatePath, java.lang.String p12CertificatePassword)Sets the credentials for the certificate-based authentication on the iOS platform.- Parameters:
useDevelopmentServer- specify if the development server must be usedp12CertificatePath- path to the p12 file containing the certificate to be used for the authentication with the serverp12CertificatePassword- password of the p12 file
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, java.io.InputStream p12CertificateStream, java.lang.String p12CertificatePassword)Sets the credentials for the certificate-based authentication on the iOS platform.- Parameters:
useDevelopmentServer- specify if the development server must be usedp12CertificateStream- input stream of the p12 file containing the certificate to be used for the authentication with the serverp12CertificatePassword- password of the p12 file
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, java.lang.String p8KeyPath, java.lang.String keyId, java.lang.String teamId)Sets the credentials for the token-based authentication on the iOS platform.- Parameters:
useDevelopmentServer- specify if the development server must be usedp8KeyPath- path to the p8 file containing the key to be used for the authentication with the serverkeyId- ID of the key, can be retrieved from the Apple Developer accountteamId- ID of the team, can be retrieved from the Apple Developer account
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, java.io.InputStream p8KeyStream, java.lang.String keyId, java.lang.String teamId)Sets the credentials for the token-based authentication on the iOS platform.- Parameters:
useDevelopmentServer- specify if the development server must be usedp8KeyStream- input stream of the p8 file containing the key to be used for the authentication with the serverkeyId- ID of the key, can be retrieved from the Apple Developer accountteamId- ID of the team, can be retrieved from the Apple Developer account
-
usesiOSDevelopmentServer
public boolean usesiOSDevelopmentServer()
Gets the status of the server to be used. The development server must be used for application development.- Returns:
- true if the development server shall be used
-
getiOSP12CertificatePath
public java.lang.String getiOSP12CertificatePath()
Gets the path to the p12 file containing the certificate to be used for the authentication with the server- Returns:
- the path to the p12 file
-
getiOSP12CertificateStream
public java.io.InputStream getiOSP12CertificateStream()
Gets the stream to the p12 file containing the certificate to be used for the authentication with the server- Returns:
- the stream of the p12 file
-
getiOSP12CertificatePassword
public java.lang.String getiOSP12CertificatePassword()
Gets the password of the p12 file- Returns:
- the password of the p12 file
-
getiOSP8KeyPath
public java.lang.String getiOSP8KeyPath()
Gets the path to the p8 file containing the key to be used for the authentication with the server- Returns:
- the path to the p8 file
-
getiOSP8KeyStream
public java.io.InputStream getiOSP8KeyStream()
Gets the stream to the p8 file containing the key to be used for the authentication with the server- Returns:
- the stream of the p8 file
-
getiOSKeyId
public java.lang.String getiOSKeyId()
Gets the ID of the key- Returns:
- the ID of the key
-
getiOSTeamId
public java.lang.String getiOSTeamId()
Gets the ID of the team- Returns:
- the ID of the team
-
-